﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using Hartley.ApplicationLogic;
using Hartley.DTOs;

namespace WebApplication1
{
    public partial class viewMember : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string memId = Request.QueryString.ToString();
            MemberAL memberAL = new MemberAL();
            if (memId != "")
            {
                List<MemberDTO> membr = memberAL.GetMemberById(new Guid(memId)).ToList();
                lblMemberFirstName.Text = membr.SingleOrDefault().FullName;
                //lblMemberDOB.Text = membr.SingleOrDefault().DateOfBirth.ToString();
                txtViewMemberPermAdd.Text = membr.SingleOrDefault().PermanantAddress;
                lblMemberDesignation.Text = membr.SingleOrDefault().Description;
                txtViewMemberWorkingAt.Text = membr.SingleOrDefault().WorkingAt;
                lblMemberContactNo.Text = membr.SingleOrDefault().TelePhoneNo;
                txtViewMemberTempAdd.Text = membr.SingleOrDefault().TemporaryAddress;
                lblMemberEmail.Text = membr.SingleOrDefault().Email;
                lblMemberColPPARegNo.Text = membr.SingleOrDefault().LifeMemberNo;
                lblMemberOLYr.Text = membr.SingleOrDefault().OrdinaryBatchYear;
                lblMemberDivision.Text = membr.SingleOrDefault().Division;
                lblMemberIndexNo.Text = membr.SingleOrDefault().SchoolIndexNo;
                lblMemberJoinedToCollege.Text = membr.SingleOrDefault().StudiedFrom;
                lblMemberLeftCollege.Text = membr.SingleOrDefault().StudiedUpto;
                lblMemberHouse.Text = membr.SingleOrDefault().House;
            }
           
        }
    }
}
